/**
 * 
 */
package remato.domain.common.impl;

import java.util.HashSet;
import java.util.Set;

import remato.common.domain.impl.base.DomainName;
import remato.domain.common.Actor;
import remato.domain.common.UseCase;
import remato.domain.common.UseCaseDefinition;

/**
 * @author Petter L. H. Eide
 *
 */
public class UseCaseDefinitionImpl extends DomainName implements UseCaseDefinition {

	private Set<Actor> actors;
	private Set<UseCase> useCases;
	private byte[] xml ;
	
	public UseCaseDefinitionImpl() {
		super();
		actors = new HashSet<Actor>();
		useCases = new HashSet<UseCase>();
	}

	/* (non-Javadoc)
	 * @see remato.domain.common.UseCaseDefinition#addActor(remato.domain.common.Actor)
	 */
	public boolean addActor(Actor actor) {
		return actors.add(actor);
	}

	/* (non-Javadoc)
	 * @see remato.domain.common.UseCaseDefinition#addUseCase(remato.domain.common.UseCase)
	 */
	public boolean addUseCase(UseCase useCase) {
		return useCases.remove(useCase);
	}

	/* (non-Javadoc)
	 * @see remato.domain.common.UseCaseDefinition#getActors()
	 */
	public Set<Actor> getActors() {
		return actors;
	}

	/* (non-Javadoc)
	 * @see remato.domain.common.UseCaseDefinition#getUseCases()
	 */
	public Set<UseCase> getUseCases() {
		return useCases;
	}

	/* (non-Javadoc)
	 * @see remato.domain.common.UseCaseDefinition#removeActor(remato.domain.common.Actor)
	 */
	public boolean removeActor(Actor actor) {
		return actors.remove(actor);
	}

	/* (non-Javadoc)
	 * @see remato.domain.common.UseCaseDefinition#removeUseCase(remato.domain.common.UseCase)
	 */
	public boolean removeUseCase(UseCase useCase) {
		return useCases.remove(useCase);
	}

	public void setActors(Set<Actor> actors) {
		this.actors = actors;
	}

	public void setUseCases(Set<UseCase> useCases) {
		this.useCases = useCases;
	}

	public byte[] getXml() {
		return xml;
	}

	public void setXml(byte[] xml) {
		this.xml = xml;
	}

	
}
